package com.erp.erp_dao.User;

import com.erp.erp_entitys.User.UserEntity;
import com.erp.erp_entitys.User.UserEntityExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IUserDAO {
    long countByExample(UserEntityExample example);

    int deleteByExample(UserEntityExample example);

    int deleteByPrimaryKey(String id);

    int insert(UserEntity record);

    int insertSelective(UserEntity record);

    List<UserEntity> selectByExample(UserEntityExample example);

    UserEntity selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") UserEntity record, @Param("example") UserEntityExample example);

    int updateByExample(@Param("record") UserEntity record, @Param("example") UserEntityExample example);

    int updateByPrimaryKeySelective(UserEntity record);

    int updateByPrimaryKey(UserEntity record);

    List<UserEntity> getAllUserNameAndCode();

    List<UserEntity> selectDimUser(String dim);

    List<UserEntity> selectAll(@Param("dcode") String dcode,@Param("name") String name);

    //根据用户组编码获取用户信息
    List<UserEntity> selectUserByGroupCode(String gcode);

    /**
     * 通过用户编码集合获取用户信息
     * @param list 用户编码集合
     * @return
     */
    List<UserEntity> getUserByUserCodeList(@Param("list") List<String> list);
}